# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=leechcore
_pkgname=LeechCore
pkgver=2.22
pkgrel=1
pkgdesc='Physical Memory Acquisition Library & The LeechAgent Remote Memory Acquisition Agent.'
arch=('x86_64' 'aarch64')
url='https://github.com/ufrisk/LeechCore/releases'
license=('GPL-3.0-only')
depends=('libusb')
makedepends=('gcc' 'make')
source=("https://github.com/ufrisk/$_pkgname/archive/v$pkgver.tar.gz")
sha512sums=('3928b9aab04493c7f97d3e3ef71183d5c86aa3fdf5a3dadbdceb3954153cbabe83adb5fbb052fe582b8dc17450ff32275e2ab0adb5e929943c3ad75ebc67ab6f')

build() {
  cd "$_pkgname-$pkgver/$pkgname"

  make
}

package() {
  cd "$_pkgname-$pkgver"

  install -Dm 755 "files/$pkgname.so" "$pkgdir/usr/lib/$pkgname.so"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

